package com.zynote.nfhoujie.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Table;

/**
 * 
 * @className:UserInfo.java
 * @classDescription: 用户信息
 * @author: AIDAN SU
 * @createTime: 2012-9-28
 *
 */

@Entity
@Table(name = "t_user_info", catalog = "nfhoujie")
public class UserInfo implements java.io.Serializable {
	
	// 字段
	
	private static final long serialVersionUID = 7571972970273928813L;
	
	/** 用户信息ID **/
	private Long infoID;

	/** 用户ID */
	private Long uid;
	
	/** 我发布的商品数 */
	private Long commodityCount;
	
	/** 我的私信数 */
	private Long pmCount;
	
	/** 我收藏的商品数 */
	private Long favoriteCount;
	
	/** 头像地址 */
	private String avatarURL;
	
	/** 皮肤标识 */
	private String skinName;
	
	// 构造方法 

	/** 默认构造方法 */
	public UserInfo() {
	}

	/** 完整的构造方法 */
	public UserInfo(Long uid, Long commodityCount, Long pmCount, Long favoriteCount, String avatarURL, String skinName){
		this.uid = uid;
		this.commodityCount = commodityCount;
		this.pmCount = pmCount;
		this.favoriteCount = favoriteCount;
		this.avatarURL = avatarURL;
		this.skinName = skinName;		
	}

	// 访问属性方法
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
		@Column(name = "info_id", unique = true, nullable = false)
	public Long getInfoID() {
		return this.infoID;
	}

	public void setInfoID(Long infoID) {
		this.infoID = infoID;
	}
	@Column(name = "uid", precision = 20, scale = 0)
	public Long getUid() {
		return this.uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	@Column(name = "commodity_count", precision = 20, scale = 0)
	public Long getCommodityCount() {
		return this.commodityCount;
	}

	public void setCommodityCount(Long commodityCount) {
		this.commodityCount = commodityCount;
	}

	@Column(name = "pm_count", precision = 20, scale = 0)
	public Long getPmCount() {
		return this.pmCount;
	}

	public void setPmCount(Long pmCount) {
		this.pmCount = pmCount;
	}
	
	@Column(name = "favorite_count", precision = 20, scale = 0)
	public Long getFavoriteCount() {
		return this.favoriteCount;
	}

	public void setFavoriteCount(Long favoriteCount) {
		this.favoriteCount = favoriteCount;
	}	
	
	@Column(name = "avatar_url", length = 128)
	public String getAvatarURL() {
		return this.avatarURL;
	}

	public void setAvatarURL(String avatarURL) {
		this.avatarURL = avatarURL;
	}

	
	@Column(name = "skin_name", length = 128)
	public String getSkinName() {
		return this.skinName;
	}

	public void setSkinName(String skinName) {
		this.skinName = skinName;
	}
	
}